var ZebraTable = new Class({
	Implements: [Options],
	options: {
		elements: 'table.list-table',
		cssEven: 'even',
		cssOdd: 'odd',
		cssHighlight: 'highlight',
		cssMouseEnter: 'mo'
	},
	initialize: function(options) {
		this.setOptions(options);
		$$(this.options.elements).each(function(table) {
			this.zebraize(table);
		},this);
	},
	zebraize: function(table) {
		table.addClass('zebratable');
		table.getElements('tr').each(function(tr,i) {
			if(tr.getFirst().get('tag') != 'th') {
				var self = this, klass = i % 2 ? self.options.cssEven : self.options.cssOdd;
				tr.addClass(klass).addEvents({
					mouseenter: function () {
						if(!tr.hasClass(self.options.cssHighlight)) tr.addClass(self.options.cssMouseEnter).removeClass(klass);
					},
					mouseleave: function () {
						if(!tr.hasClass(self.options.cssHighlight)) tr.removeClass(self.options.cssMouseEnter).addClass(klass);
					}
				});
			}
		},this);
	}
});